Skip to content

Appfunctions media attachments#27

Merged
keyboardsurfer merged 24 commits into
android:mainfrom
calebareeveso:appfunctions-media-attachments
Jul 21, 2026
Merged

Appfunctions media attachments#27
keyboardsurfer merged 24 commits into
android:mainfrom
calebareeveso:appfunctions-media-attachments

Conversation

@calebareeveso

@calebareeveso calebareeveso commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Screenshots

s-1 s-2 s-3 s-4

What I have done and why

Added support for sending image attachments and changing chat wallpapers across the Agent and ChatApp, and updated all code to work with appfunctions 1.0.0-alpha10 .

Summary of Changes

ChatApp:

  • Added imageUris to send(...) so users can attach images to chat messages.
  • Added updateChatWallpaper(...) so users can change a conversation's wallpaper.
  • Updated chat AppFunctions to the new 1.0.0-alpha10 AppFunctionService format.

Agent App:

  • Automatically grants temporary read permission (FLAG_GRANT_READ_URI_PERMISSION ) whenever sending local content:// image URIs to another app
  • Displays image preview cards in the chat window for AI-generated images
  • Fixed an API crash (HTTP 400 Duplicate function declaration) that happened when both phone and Wear OS companion apps were installed
  • Added Kotlin serialization plugin and MessageAttachmentConverter to persist message media attachments in Room DB

Caleb Areeveso added 6 commits July 8, 2026 20:22
Change-Id: Ie5a3a97c4dc2eefe349f0df22313f2bc12fcfe01
Change-Id: Ie3fbb88ae72223cc9b1fb29ca226fdc045200104
Change-Id: Id88dc93971c3c21a8044d125070785dd3c879fb9
… Gemini tool names

Change-Id: Id2ff4aadfceddbc3b2a4b720eb882323f0cad7d8
…rt wallpaper support

Change-Id: Ie24524f68e30243682a31d3b99701aae760fff20
Change-Id: I5f3f8d62d3be770e5035fc1c785b346ca74695e1

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for custom chat wallpapers in the ChatApp and adds image generation capabilities to the AI agent using the Gemini API. Key changes include the creation of a WallpaperRepository to manage chat backgrounds, updates to the UI to render wallpapers, and enhancements to the agent's orchestrator to handle remote file references, download them to local cache, and grant URI permissions. Feedback on these changes highlights three main areas for improvement: adding connection and read timeouts to the HttpURLConnection used for downloading files, offloading blocking disk I/O operations in the wallpaper flow to Dispatchers.IO to prevent UI stutters, and wrapping contentResolver.openInputStream in a try-catch block to gracefully handle potential security or file-not-found exceptions.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread ChatApp/shared/src/main/kotlin/com/example/chatapp/data/WallpaperRepository.kt Outdated
Caleb Areeveso added 6 commits July 10, 2026 11:39
Change-Id: I7d56a269f7965e54ce98f84595a12f3035891056
…tless suppressions

Change-Id: Ibee730a08f815dff8cc600845af1d2da3636e78b
… safety and readability

Change-Id: I584583bb8b04bb7a4530f880a6441574e125fbbd
…ass names

Change-Id: I7557376d8765ef9761534936177a8363f5b79808
… private helpers

Change-Id: I484c7cb582b8cd436fee8793119b434aa3d84784
…dies and extract mock helpers

Change-Id: Id24a66497c47cc87d11cf37fec17fc196a710de9
Comment thread agent/app/build.gradle.kts
Comment thread ChatApp/shared/src/main/kotlin/com/example/chatapp/data/WallpaperRepository.kt Outdated
Comment thread ChatApp/shared/src/main/kotlin/com/example/chatapp/data/WallpaperRepository.kt Outdated
keyboardsurfer and others added 10 commits July 20, 2026 16:39
Change-Id: I99971c606c783a96e340cc8f947f65d90e71ab73
…pository

Change-Id: I2ccd86d2d895b70706477213478ea39cbffa33c6
Change-Id: I810ce32ae9e5e908896475f42cd43d8b02980d25
Change-Id: I673954d3ebe987a570dadbdca5807e5b09744a90
Change-Id: I056f58d80290c561500998f3f67ad89042007776
Change-Id: I81dc207c40dc2bb29996a1797e28818d6104f30c
Change-Id: If4daca546d0d699d4461010e9347c10343dc30a0
…ate test

Change-Id: Iba93fd0623d5e07f0ecf0a9f577db98fe2e33d99
@calebareeveso
calebareeveso requested a review from a team as a code owner July 21, 2026 08:14
Caleb Areeveso added 2 commits July 21, 2026 08:20
Change-Id: Ifeb2b15e846755bbbf351b8da9b617bd4d2f1539
Change-Id: I56067629e14109a1f3a43895fc55a239b6450f8f
@keyboardsurfer
keyboardsurfer merged commit d9cdc55 into android:main Jul 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants